package com.xilin.kotlincoroutine

import kotlinx.coroutines.CoroutineStart
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun Kt() = runBlocking {
        val job = launch(start = CoroutineStart.DEFAULT) {
            println("hello job1")
            delay(5000)
            println("job finished")
        }
        job.cancel()
    }
}